<template>
	<block v-if="!rediret">
		<navigator :url="'/pages/list/detail/detail?id='+item.id" class="group">
			<view class="item">
				<view class="image">
					<image :src="item.logo" />
					<view class="icon" v-if="item.texing">
						{{item.texing}}
					</view>
					<view class="icon1" v-if="!item.texing">

					</view>
					<view class="guanzhu" v-if="item.guanzhu">
						<text class="text">{{item.guanzhu}}人关注</text>
					</view>
				</view>
				<view class="shuge"></view>
				<view class="title">
					<view class="first-title">
						{{item.title}}
					</view>
					<view class="title-park">{{item.park_name}}</view>
					<view class="tag">
						<view class="biaozhi" v-if="item.renzheng">
							<image class="image1" src="https://pic.fhshidai.com/file6wWaYqYP5Pl96vwYreOLw8qpHd1bzZUjI9xFB8ZJ.png"></image>
						</view>
						<view v-for="(tag,index) in item.tags" :key="index" class="tag-item">{{tag.name}}</view>

					</view>
					<view class="bottom-price">
						<view class="price" v-if="item.price!=0">
							<view class="price-title">每平售价</view>
							<view class="price-item">

								<view class="price-text"> {{item.price}}元</view>
								<!-- 		<view class="price-danwei"> 元/㎡</view> -->
							</view>

							<!-- 	<view class="price-dazhe" v-if="item.dazhe">{{item.dazhe}}折</view>
			 -->
						</view>

						<view class="price" v-if="item.price==0">
							<view class="price-title">每平售价</view>
							<view class="price-item">
								<view class="price-text"> 面议</view>

							</view>
							<!-- 	<view class="price-dazhe" v-if="item.dazhe">{{item.dazhe}}折</view>
		 -->
						</view>
							<view class="shuxian" v-if="item.zhekou"></view>
						<view class="zhekou" v-if="item.zhekou">
							<view class="left">能省金额：</view>
							<view class="right">{{item.zhekou}}<text>元</text></view>
						</view>
					</view>
				</view>

			</view>

		</navigator>

	</block>
	<block v-else>
		<navigator :url="'/pages/list/detail/detail?id='+item.id" open-type="redirect" class="group">
			<view class="item">
				<view class="image">
					<image :src="item.logo" />
					<view class="icon" v-if="item.texing">
						{{item.texing}}
					</view>
					<view class="guanzhu" v-if="item.guanzhu">
						<text class="text">{{item.guanzhu}}人关注</text>
					</view>
				</view>
				<view class="shuge"></view>
				<view class="title">
					<view class="first-title">
						{{item.title}}
					</view>
					<view class="title-park">{{item.park_name}}</view>
					<view class="tag">
						<view class="biaozhi" v-if="item.renzheng">
							<image class="image1" src="https://pic.fhshidai.com/file6wWaYqYP5Pl96vwYreOLw8qpHd1bzZUjI9xFB8ZJ.png"></image>
						</view>
						<view v-for="(tag,index) in item.tags" :key="index" class="tag-item">{{tag.name}}</view>

					</view>
				<view class="bottom-price">
										<view class="price" v-if="item.price!=0">
											<view class="price-title">每平售价</view>
											<view class="price-item">

												<view class="price-text"> {{item.price}}元</view>
												<!-- 		<view class="price-danwei"> 元/㎡</view> -->
											</view>

											<!-- 	<view class="price-dazhe" v-if="item.dazhe">{{item.dazhe}}折</view>
							 -->
										</view>

										<view class="price" v-if="item.price==0">
											<view class="price-title">每平售价</view>
											<view class="price-item">
												<view class="price-text"> 面议</view>

											</view>
											<!-- 	<view class="price-dazhe" v-if="item.dazhe">{{item.dazhe}}折</view>
				-->
										</view>
											<view class="shuxian" v-if="item.zhekou"></view>
										<view class="zhekou" v-if="item.zhekou">
											<view class="left">能省金额：</view>
											<view class="right">{{item.zhekou}}<text>元</text></view>
										</view>
									</view>

				</view>

			</view>

		</navigator>
	</block>
</template>

<script>
	export default {
		props: {
			item: {
				value: Object,
				default: {}
			},
			rediret: {
				value: Boolean,
				default: false
			}
		},
		data() {
			return {

			};
		},

	}
</script>

<style scoped lang="scss">
	.shuge {
		width: 28rpx;
	}

	.shuxian {
		width: 2rpx;
		height: 58rpx;
		background: rgba(0, 0, 0, 1);
		opacity: 0.1;
		display: inline-block;
		float: left;
	}

	.biaozhi {
		display: inline-flex;
		justify-content: center;
		align-items: center;
		width: 100rpx;
		height: 35rpx;
		background: rgba(218, 51, 55, 1);
		border-radius: 4rpx;
		text-align: center;
		margin-right: 10rpx;

		.image1 {
			border-radius: 0rpx;
			width: 87rpx;
			height: 18rpx;
		}
	}

	.group {
		background: #FFFFFF;

		//		padding-left: $padding-left;
		//		padding-right: $padding-right;
		//	box-shadow: 0px 3rpx 3rpx 0px rgba(0, 0, 0, 0.1);
		padding-top: 44rpx;
			padding-bottom: 27rpx;
		//margin-top: 40rpx;
		border-bottom: 2rpx solid #F5F5F5;
		//border-radius: 10rpx;
	}
	.bottom-price{
		display: flex;
		align-items: center;
		height: 80rpx;
			margin-top: 31rpx;
	}
	.zhekou {

		margin-top: 20rpx;
		margin-bottom: 28rpx;
		display: flex;
		justify-content: space-between;
		flex-direction: column;
		align-items: flex-start;
		padding-left: 40rpx;
		padding-right: 32rpx;


		.left {
			font-size: 22rpx;
			font-family: SourceHanSansCN;
			font-weight: 500;
			color: rgba(218, 51, 55, 1)
		}

		.right {
			font-size: 30rpx;
			font-family: SourceHanSansCN;
			font-weight: bold;
			color: rgba(218, 51, 55, 1);

			text {
				font-size: 30rpx;
				font-family: SourceHanSansCN;
				font-weight: 500;
				color: rgba(218, 51, 55, 1);
			}
		}
	}

	.item {
		display: flex;
		justify-content: space-between;

		.image {
			width: 202rpx;
			height: 202rpx;
			border-radius: 10rpx;

			image {
				width: 202rpx;
				height: 202rpx;
				border-radius: 10rpx;
			}

			.icon {
				position: relative;
				width: fit-content;
				width: -webkit-fit-content;
				width: -moz-fit-content;
				top: -210rpx;
				left: 0rpx;
				padding-left: 12rpx;
				padding-right: 10rpx;
				height: 35rpx;
				z-index: 10;
				font-size: 20rpx;
				font-weight: bold;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				border-top-left-radius: 10rpx;
				border-bottom-left-radius: 5rpx;
				border-bottom-right-radius: 5rpx;
				border-top-right-radius: 5rpx;
				color: #FFFFFF;
				background: #DA3337;

			}

			.icon1 {
				position: relative;
				width: fit-content;
				width: -webkit-fit-content;
				width: -moz-fit-content;
				top: -255rpx;
				left: 0rpx;
				padding-left: 12rpx;
				padding-right: 10rpx;
				height: 35rpx;
				z-index: 10;
				font-size: 20rpx;
				font-weight: bold;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				border-top-left-radius: 10rpx;
				border-bottom-left-radius: 5rpx;
				border-bottom-right-radius: 5rpx;
				border-top-right-radius: 5rpx;
			}

			.guanzhu {
				width: 113rpx;
				height: 42rpx;
				z-index: 10;


				background: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));

				bottom: 86rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				left: 0rpx;

				padding-left: 10rpx;
				padding-right: 10rpx;

				.text {
					font-size: 20rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: rgba(255, 255, 255, 1);


				}

				width:fit-content;
				width:-webkit-fit-content;
				width:-moz-fit-content;
				position: relative;
				border-bottom-left-radius:10rpx;
			}
		}


		.title {
			//width: 355rpx;
			display: flex;
			flex-direction: column;

			.first-title {
				font-size: 28rpx;
				font-weight: 700;
				color: #494949;
				text-overflow: -o-ellipsis-lastline;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				line-clamp: 2;
				-webkit-box-orient: vertical;

			}

			.title-park {
				font-size: 24rpx;
				color: #9A9BA0;
				line-height: 62rpx;
				margin-bottom: 6rpx;
			}

			.tag {
				display: flex;
				flex-wrap: wrap;

				.tag-item {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 100rpx;
					color: #476987;
					margin-bottom: 11rpx;
					margin-right: 11rpx;
					height: 35rpx;
					font-size: 20rpx;
					background: rgba(236, 241, 244, 1);
					border-radius: 4rpx;
				}
			}

			.price {
				display: flex;
				align-items: flex-start;
				flex-direction: column;
				margin-top: 20rpx;
				margin-bottom: 28rpx;
				width: 159rpx;

				justify-content: space-between;

				.price-item {
					display: flex;
					flex-direction: row;
					align-items: center;

				}

				.price-title {
					font-size: 22rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: rgba(154, 155, 160, 1);
				}

				.price-text {
					color: #313131;
					font-size: 30rpx;
					padding-right: 7rpx;
					font-weight: bold;
				}

				.price-danwei {
					color: #9A9BA0;
					font-size: 24rpx;

				}

				.price-dazhe {
					display: inline-flex;
					justify-content: center;
					align-items: center;
					font-size: 22rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: rgba(218, 51, 55, 1);
					width: 120rpx;
					height: 35rpx;
					margin-left: 26rpx;
					background: url(https://pic.fhshidai.com/filef23kxK0Ld1c9zNixHVFjVmVXcUhv3QGLqj8YKarh.png);
					background-size: 120rpx 35rpx;
				}
			}

		}

	}
</style>
